﻿<%@ Page Title="" Language="C#" MasterPageFile="~/Site.Master" AutoEventWireup="true" CodeBehind="Checkout.aspx.cs" Inherits="Web.Checkout" %>
<asp:Content ID="Content1" ContentPlaceHolderID="head" runat="server">
    <title>Thanh Toán</title>
</asp:Content>
<asp:Content ID="Content2" ContentPlaceHolderID="ContentPlaceHolder1" runat="server">
    <div class="row">
        <h3 class="list-group-item active heading">
            Thanh Toán</h3>
        <div class="panel panel-default">
            <div class="panel-heading"><h4>Thông tin khách hàng</h4></div>
            <div class="panel-body">
                <asp:ValidationSummary ID="ValidationSummary1" runat="server" ForeColor="Red" 
                    DisplayMode="List" />
                <div class="form-group">
                    <label for="txtHoTen">Họ Tên</label>
                    <asp:RequiredFieldValidator ID="RequiredFieldValidator1"
                        runat="server" ErrorMessage="Chưa nhập họ tên" 
                        ControlToValidate="txtHoTen" Display="Dynamic" ForeColor="Red">*</asp:RequiredFieldValidator>
                    <asp:TextBox ID="txtHoTen" runat="server" CssClass="form-control"  placeholder="Họ Tên"></asp:TextBox>
                </div>
                <div class="form-group">
                    <label for="txtDiaChi">Địa Chỉ</label>
                    <asp:RequiredFieldValidator ID="RequiredFieldValidator2"
                        runat="server" ErrorMessage="Chưa nhập địa chỉ" 
                        ControlToValidate="txtDiaChi" Display="Dynamic" ForeColor="Red">*</asp:RequiredFieldValidator>
                    <asp:TextBox ID="txtDiaChi" runat="server" CssClass="form-control"  placeholder="Địa Chỉ"></asp:TextBox>
                </div>
                <div class="form-group">
                    <label for="txtDienThoai">Điện Thoại</label>
                    <asp:RequiredFieldValidator ID="RequiredFieldValidator3"
                        runat="server" ErrorMessage="Chưa nhập điện thoại" 
                        ControlToValidate="txtDienThoai" Display="Dynamic" ForeColor="Red">*</asp:RequiredFieldValidator>
                    <asp:RegularExpressionValidator ID="RegularExpressionValidator1" runat="server" 
                        ErrorMessage="Nhập sai định dạng số điện thoại" 
                        ControlToValidate="txtDienThoai" Display="Dynamic" ForeColor="Red" 
                        ValidationExpression="[\d\s]{9,11}">*</asp:RegularExpressionValidator>
                    <asp:TextBox ID="txtDienThoai" runat="server" CssClass="form-control"  
                        placeholder="Điện Thoại" TextMode="Phone"></asp:TextBox>
                </div>
                <div class="form-group">
                    <label for="txtEmail">Email</label>
                    <asp:RequiredFieldValidator ID="RequiredFieldValidator4"
                        runat="server" ErrorMessage="Chưa nhập email" 
                        ControlToValidate="txtEmail" Display="Dynamic" ForeColor="Red">*</asp:RequiredFieldValidator>
                    <asp:RegularExpressionValidator ID="RegularExpressionValidator2" runat="server" 
                        ErrorMessage="Nhập sai định dạng email" 
                        ControlToValidate="txtEmail" Display="Dynamic" ForeColor="Red" 
                        ValidationExpression="\w+([-+.']\w+)*@\w+([-.]\w+)*\.\w+([-.]\w+)*">*</asp:RegularExpressionValidator>
                    <asp:TextBox ID="txtEmail" runat="server" CssClass="form-control"  
                        placeholder="Email" TextMode="Email"></asp:TextBox>
                </div>
                <div class="form-group">
                    <label for="txtDienGiai">Diễn giải</label>
                    <asp:TextBox ID="txtDienGiai" runat="server" CssClass="form-control"  
                        placeholder="Diễn Giải" Rows="5" TextMode="MultiLine"></asp:TextBox>
                </div>
            </div>
        </div>
        <div class="form-horizontal" role="form">
            <div class="form-group">
                <label for="inputfield1" class="col-sm-2 control-label">Input 1</label>
                <div class="col-sm-10">
                    <input type="text" class="form-control" id="inputfield1" placeholder="Input 1">
                </div>
            </div>
            <div class="form-group">
                <label for="inputfield2" class="col-sm-2 control-label">Input 2</label>
                <div class="col-sm-10 controls">
                    <div class="input-group">
                        <span class="input-group-addon">.00</span>
                        <input type="text" class="form-control" id="inputfield2" placeholder="Input 2">
                    </div>
                </div>
            </div>
            <div class="form-group">
                <label for="inputfield3" class="col-sm-2 control-label">Input 3</label>
                <div class="col-sm-10">
                    <input type="text" class="form-control" id="inputfield3" placeholder="Input 3">
                </div>
            </div>
        </div>
        <div class="panel panel-default">
            <div class="panel-heading"><h4>Thông tin giỏ hàng</h4></div>
            <div class="panel-body">
                <asp:GridView ID="GridView1" runat="server" AutoGenerateColumns="False" 
                    BorderStyle="None" CssClass="table table-hover" GridLines="None">
                    <Columns>
                        <asp:TemplateField HeaderText="Hình Ảnh">
                            <ItemTemplate>
                                <asp:Image ID="Image1" runat="server" ImageUrl='<%# Eval("HinhAnh") %>' 
                                    Width="70px" />
                            </ItemTemplate>
                        </asp:TemplateField>
                        <asp:BoundField DataField="MaHang" HeaderText="Mã ">
                        <ItemStyle Width="100px" />
                        </asp:BoundField>
                        <asp:BoundField DataField="TenHang" HeaderText="Tên Hàng" />
                        <asp:BoundField DataField="DVT" HeaderText="DVT" />
                        <asp:BoundField DataField="DonGia" HeaderText="Đơn Giá" />
                        <asp:BoundField DataField="SoLuong" HeaderText="Số Lượng" />
                        <asp:BoundField DataField="ThanhTien" HeaderText="Thành Tiền" />
                    </Columns>
                    <EmptyDataTemplate>
                        Hiện tại bạn chưa mưa sản phẩm nào, hãy quay về
                        <asp:HyperLink ID="HyperLink2" runat="server" NavigateUrl="~/Products.aspx">Trang sản phẩm</asp:HyperLink>
                        &nbsp;để mua hàng !
                    </EmptyDataTemplate>
                </asp:GridView>
                <p>
                    Tổng tiền :
                    <asp:Label ID="lblTongTien" runat="server" ForeColor="Red" Text="Label"></asp:Label>
                    VNĐ
                </p>
            </div>
        </div>
        <br />
        
        <a class="btn btn-default" href="Cart.aspx"><span aria-hidden="true" 
            class="glyphicon glyphicon-plus"></span>Mua tiếp </a>
        <asp:LinkButton ID="btnCheckout" runat="server" CssClass="btn btn-primary" 
            onclick="btnCheckout_Click"> <span aria-hidden="true" 
            class="glyphicon glyphicon-edit"></span> Thanh toán</asp:LinkButton>
    </div>
</asp:Content>
